Binding a combo box to an enum with Silverlight 2

Starting with a great example of radio button binding here:

http://www.nablasoft.com/alkampfer/index.php/2008/07/29/binding-combobox-to-enum-in-silverlight/

I added a combo box example (which seemed be missing from the example).

sl2bindenumwithcombozip

 

Here’s the app with both radios and combo boxes:

 

Hope it helps!

2 Responses to “Binding a combo box to an enum with Silverlight 2”

  1. Justin Halls Says:

    it all seems verycomplicated just to populate a combobox from the enum, and you have to explicity add each member of the enum to an array anyway. You might just as well create List of all the enum members and then simply binf the combobox.ItemsSource to that list – no need for converters or explicitly defined resources at all. Far less code, far less possibility of erros creeping in.

Leave a comment